﻿using RestSharp;
using System.Text;
using Ymatou.ServiceCenter;

namespace YmtAuth.Dto
{
    /// <summary>
    /// 解锁IP
    /// </summary>
    [Resource("auth.ymatou.com", "/json/reply/UnLockIpRequestDto", Method.POST, ParameterBuildType.FormUrlEncoded)]
    public class UnLockIpRequestDto
    {
        /// <summary>
        /// IP列表
        /// </summary>
        public string[] Ip { get; set; }
        
        /// <summary>
        /// 操作者
        /// </summary>
        public string Operating { get; set; }

        /// <summary>
        /// 原因描述
        /// </summary>
        public string Description { get; set; }

        /// <summary>
        /// IP所属的来源类型 1 - 买家IP, 2 - 买手IP
        /// </summary>
        public int IpType { get; set; }

        public override string ToString()
        {
            StringBuilder sb = new StringBuilder(" UnLockIpRequestDto parameters： ");
            sb.AppendFormat("IpType: {0}, ", IpType);
            sb.AppendFormat("Operating: {0}, ", Operating);
            sb.AppendFormat("Ip: {0}, ", Ip == null?"":string.Concat(Ip));
            sb.AppendFormat("Description: {0}, ", Description);

            string str = sb.ToString();
            return str.Length > 1000 ? str.Substring(0, 1000) : str;
        }
    }
}
